<%--
  Created by IntelliJ IDEA.
  User: 29276
  Date: 2021/8/22
  Time: 19:00
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    //http://localhost:8080/01_sxtoa_war_exploded/
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <base href="<%=basePath%>"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/jquery.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            $(".click").click(function() {
                $(".tip").fadeIn(200);
            });
            $(".tiptop a").click(function() {
                $(".tip").fadeOut(200);
            });
            $(".sure").click(function() {
                $(".tip").fadeOut(100);
            });
            $(".cancel").click(function() {
                $(".tip").fadeOut(100);
            });
        });
    </script>

    <script type="text/javascript">
        $(function () {

            $("#btn").click(function () {
                window.location.assign("expense/myExpense.jsp");
            })

            var expId = "${param.expId}";
            console.log(expId);
            $.post("expenseServlet", {expId: expId, methodName:"MyExpenseListItem"}, function (data) {
                if (data === "sessionTimeOut") {
                    window.location.href="login.jsp";
                    return;
                }
                eval("var ds="+data);
                console.log("============");
                console.log(ds);
                const tb = $("#tb");
                for(var i=0;i < ds.length;i++){
                    tb.append("<tr>\n" +
                        "            <td>\n" +
                        "                <input name=\"\" type=\"checkbox\" value=\"\" />\n" +
                        "            </td>\n" +
                        "            <td>"+ds[i].itemId+"</td>\n" +
                        "            <td>"+ds[i].type+"</td>\n" +
                        "            <td>"+ds[i].amount+"</td>\n" +
                        "            <td>"+ds[i].itemDesc+"</td>\n" +
                        "\n" +
                        "        </tr>");
                }

            })
        })
    </script>

</head>

<body>

<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="#">报销管理</a></li>
        <li><a href="#">查看具体报销项</a></li>
    </ul>
</div>

<div class="rightinfo">

    <div class="formtitle1"><span>具体报销项</span></div>

    <table class="tablelist">
        <thead>
        <tr>
            <th>
                <input name="" type="checkbox" value="" checked="checked" />
            </th>
            <th>报销项编号<i class="sort"><img src="images/px.gif" /></i></th>
            <th>报销项类型</th>
            <th>报销项金额</th>
            <th>报销项说明</th>
        </tr>
        </thead>
        <tbody id="tb">
        </tbody>
    </table>

</div>
<input id="btn" name="" type="button" class="btn" value="返回" />
<script type="text/javascript">
    $('.tablelist tbody tr:odd').addClass('odd');
</script>

</body>

</html>
